{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2023, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

<tr style="vertical-align:top">
  <td style="{{#if styles }}display: flex; color:red;justify-content: flex-start{{/if}}">
    <input class="custom_tag_key" type="text" name="key" value="{{key}}">
  </td>
  {{#if mandatory}}
    <td>
      <select class="custom_tag_mandatory">
        <option value="M" {{#ifEquals mandatory "M"}} selected="selected" {{/ifEquals}}>{{ tr "Mandatory" }}</option>
        <option value="O" {{#ifEquals mandatory "O"}} selected="selected" {{/ifEquals}}>{{ tr "Optional" }}</option>
      </select>
    </td>
  {{/if}}
  <td>
    <table>
      <tbody class="custom_body">
        <textarea style="margin-left: 7px" class="custom_tag_value" name="value">
          {{~value~}}
        </textarea>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="5">
            <a type="button" style="border-radius: 20px; background-color:#2E9CB9" class="change_to_vector_attribute button small small-12 secondary radius">
              <i class="fas fa-plus"></i>
            </a>
          </td>
        </tr>
      </tfoot>
    </table>
  </td>
  {{#if valueDefault }}
    <td>
      <textarea style="margin-left: 7px" class="custom_tag_default" name="value">
        {{~valueDefault~}}
      </textarea>
    </td>
  {{/if}}
  <td style="{{#if styles }}width: 150%; display: flex; justify-content: flex-end; {{/if}}text-align: right;">
    <a href="#"><i class="fas fa-times-circle remove-tab"></i></a>
  </td>
</tr>
